<%@ page  contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="page" uri="http://www.forten.org/taglib/page"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="forten" uri="http://www.forten.org/taglib/forten"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理人员选课</title>
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../styles/css/reset.css">
<link type="text/css" rel="stylesheet" href="../styles/css/index.css">
<script type="text/javascript" src="../scripts/html5.js"></script>
<!-- end -->
<!-- jquery -->
<script type="text/javascript" src="../scripts/jquery-1.6.min.js"></script>
<!-- 日期控件 -->
<script type="text/javascript" src="../scripts/Calendar/Js/calendar.js"></script>
<link type="text/css" rel="stylesheet"
	href="../scripts/Calendar/Css/calendar.css" />
<!-- end -->
</head>
<body>
	<script type="text/javascript">
		function doQuery() {
			var start = $('#start');
			var end = $('#end');
			if(start.val() == '' && end.val() !=''){
				alert('请选择您要查询上课时间的起始时间！');
			}
			document.frm.action = "showCourseSelectionAdminList.jspx";
			document.frm.submit();
		}
	</script>
	<c:if test="${! empty message}">

		<script type="text/javascript" language="javascript">
			window.onload = function() {
				var message = "${message}";
				alert(message);
			}
		</script>
	</c:if>
	<header>
	<div class="headerWrap"></div>
	</header>

	<div class="content">

		<section>
		<div class="rc_fbt">
			<form:form id="frm" name="frm" method="post"
				action="showCourseSelectionAdminList.jspx"
				modelAttribute="courseSelectAdminQo">
				<span class="left"> 
				<span class="ml15 mr5 left">上课时间从</span>
					<form:input path="start" class="s_txt left mt13" 
					onclick="displayCalendar(this, 'yyyymmdd', this, false, '');"
										size="8" maxlength="8" readonly="true"/>
					<span class="ml15 mr5 left">至</span>
					<form:input path="end" class="s_txt left mt13" 
					onclick="displayCalendar(this, 'yyyymmdd', this, false, '');"
										size="8" maxlength="8" readonly="true"/>
				<span class="ml15 mr5 left">课程名</span> <form:input
						path="name" class="s_txt left mt13" /> <span class="mlr15 left">教师</span>
					<form:input path="teacherName" class="s_txt ml5 left mt13" /> <a
					class="btn_search ml10 left mt10" href="#" onclick="doQuery();"></a>
				</span>
			</form:form>
		</div>
		<div class="rc_info mt20">
			<h3>
				<span class="r_title_ico"></span> 已开课程信息
			</h3>
		</div>

		<table class="rc_tab01" cellspacing="0" cellpadding="0">
			<tbody>
				<tr>
					<th style="width: 8%; text-align: center;">课程号</th>
					<th style="width: 18%; text-align: center;">课程名</th>
					<th style="width: 16%; text-align: center;">上课时间</th>
					<th style="width: 4%; text-align: center;">学时</th>
					<th style="width: 5%; text-align: center;">课容量</th>
					<th style="width: 6%; text-align: center;">教师</th>
					<th style="width: 16%; text-align: center;">选课结束时间</th>
					<th style="width: 17%; text-align: center;">操作</th>
				</tr>
				<c:forEach items="${dto}" var="dto" varStatus="s">
					<tr>
						<td style="text-align: center;">${dto.num }</td>
						<td style="text-align: center;"><a href="../course/gotoCourseEdit.jspx?id=${dto.id}&flag=1" target="_blank">${dto.name }</a></td>
						<td style="text-align: center;"><fmt:formatDate
								value="${dto.teachTime }" pattern="yyyy年MM月dd日HH点mm分" /></td>
						<td style="text-align: center;">${dto.credit }</td>
						<td style="text-align: center;">${dto.classCapacity }</td>
						<td style="text-align: center;">${dto.teacherName }</td>
						<td style="text-align: center;"><fmt:formatDate
								value="${dto.endTimeChoose }" pattern="yyyy年MM月dd日HH点mm分" /></td>
						<td class="rc_cr" style="text-align: center;"><a
							href="gotoCadreList.jspx?courseId=${dto.id }">选课</a>
							<c:if test="${dto.classChosenNum > 0 }">
							&nbsp;|&nbsp; 
							<a href="gotoSendCheckInShortMsg.jspx?courseId=${dto.id }" 
							target="_blank">考勤短信</a>
							</c:if>
							<c:if test="${dto.classChosenNum == 0 }">
							&nbsp;|&nbsp; 
							<span style="color: gray;">考勤短信</span>
							</c:if>
							&nbsp;|&nbsp; <a
							href="gotoSendMailToCadre.jspx?courseId=${dto.id }"
							target="_blank">重发邮件</a> &nbsp;|&nbsp; <a
							href="gotoSendShortMessageToCadre.jspx?courseId=${dto.id }"
							target="_blank">重发短信</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<page:page hrefStr="showCourseSelectionAdminList.jspx" name="page"></page:page>

		</section>
		<!-- cont end -->
	</div>

<%@include file="/common/foot.jsp"%>